<?php 
define('__ROOT__', dirname(dirname(__FILE__))); 
include_once(__ROOT__.'/includes/header.php');
include_once(__ROOT__.'/includes/leftnav.php'); ?>
<div class="span9">
    <ul class="breadcrumb">
                    <li>
                        <a href="<?php echo base_url('/home'); ?>">Home</a> <span class="divider">/</span>
                    </li>
                    <li>
                        <a href="<?php echo base_url('/admin/dashboard'); ?>">Dashboard</a> <span class="divider">/</span>
                    </li>
                    <li>
                        Change Profile
                    </li>
    </ul>
	<?php if (isset($message)) 
		echo '<span class="error">'. $message . '</span>';
	?>
	<?php echo validation_errors(); ?>
	<div id="ProfilePage">
    <div id="LeftCol">
        <div id="Photo"><img src="<?php echo site_url('/assets/uploads/avators') .'/'. $user['image_url']; ?>"></div>
        <div id="ProfileOptions">
        
        </div>
    </div>
	<form id="profileUpdatefrm" action="<?php echo $action; ?>" method="Post">
    <div id="Info">
		<input type="hidden" id="id" name="id" value="<?php echo $user['userID']; ?>">
        <p>
            <strong>Name:</strong>
            <span><input type="text" id="name" name="name" value="<?php echo $user['name']; ?>"></span>
        </p>
        <p>
            <strong>Display Name:</strong>
            <span><input type="text" id="displayName" name="displayName" value="<?php echo $user['displayName']; ?>"></span>
        </p>
        <p>
            <strong>Email:</strong>
            <span><?php echo $user['email']; ?></span>
        </p>
        <p>
            <strong>Phone:</strong>
           <span><input type="text" id="phone" name="phone" value="<?php echo $user['phone']; ?>"></span>
        </p>
        <p>
            <strong>Address:</strong>
			<span><input type="text" id="address" name="address" value="<?php echo $user['address']; ?>"></span>
          
        </p>
		
    </div>
	<hr/>
	<div>
	<legend>Change Password</legend>
		<input type="hidden" id="oldpsw" name="oldpsw" value="<?php echo $user['oldPsw']; ?>">
		<div class="control-group">
			<label class="control-label" for="inputPassword">Old Password</label>
			<div class="controls">
			  <input type="password" id="inputPassword" name="inputPassword" placeholder="Password">
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="newPassword">New Password</label>
			<div class="controls">
			  <input type="password" id="newPassword" name="newPassword" placeholder="Password">
			</div>
		</div>
		<div class="control-group">
			<div class="controls">
			  <button type="submit" class="btn btn-primary">Change</button>
			  <button type="reset" class="btn">Cancel</button>
			</div>
		</div>
	</div>
</form>
    <!-- Needed because other elements inside ProfilePage have floats -->
    <div style="clear:both"></div>
</div>
</div>
<style type="text/css">
#ProfilePage
{
    /* Move it off the top of the page, then centre it horizontally */
    margin:10px auto;
    width: 90%;
}

#LeftCol
{
    /* Move it to the left */
    float: left;

    width: 25%;
    text-align: center;

    /* Move it away from the content */
    margin-right: 20px;
}

#Photo
{
    /* Width and height of photo container */
    width: 150px;
    height: 100px;
	
/* For visibility. Delete me */
border: 0px solid purple;
}

#PhotoOptions
{
    text-align: left;
    width: 150px;
}

#Info
{
    width: 70%;
    text-align: left;

    /* Move it to the right */
    float: right;
}

#Info strong
{
    /* Give it a width */
    display: inline-block;
    width: 100px;
}

#Info span
{
    /* Give it a width */
    display: inline-block;
    width: 250px;

}
</style>


<?php include_once(__ROOT__.'/includes/header.php'); ?>